//package com.example.Config;
//
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//public class LoginHandlerInterceptor implements HandlerInterceptor {
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        //如果登录成功，应该有用户的session；
//        Object loginUser = request.getSession().getAttribute("loginUser");
//
//        return loginUser != null;
//    }
//}
